<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php session_start();
$newip = $_SERVER['REMOTE_ADDR'];
$Employee=$_SESSION['Username'];
$coup=$_SESSION['Coupon'];


if(!isset($Employee)||empty($Employee)||$newip!= $_SESSION['IP'])
{echo "If you are payday loan applicant, please start your ". "<a href='apply.php'>application here</a> now, thank you for your cooperation!";
exit();
}

//The following part is to set up interactive function between user and server
$status = $loginID = $accountinf = $decision= $reason=$approvedloan=null; //declare vars
$payment=$CID=null;

$conn = mysql_connect('cash2uca.ipagemysql.com', 'cash2uca', 'actW3740!@#$'); 
	if (!$conn) { 
	    die('Could not connect: ' . mysql_error()); 
		} 

mysql_select_db(cash2uca);

if(isset($_POST["mstatus"]) && is_numeric($_POST["mstatus"]))
{
    $status = $_POST["mstatus"];
}

if(isset($_POST["employeeid"]) && is_numeric($_POST["employeeid"]))
{
    $loginID = $_POST["employeeid"];
}

if(isset($_POST["accountid"]) && is_numeric($_POST["accountid"]))
{
    $accountid = $_POST["accountid"];
	$sqlPR = "SELECT * FROM Applications WHERE AccountID = $accountid";
        $PR = mysql_query($sqlPR,$conn);
	$rowPR = mysql_fetch_array($PR);
	$NVsts=$rowPR['NumberofVisits'];
	$coup100=$rowPR['COUPON'];
	$cost100=$rowPR['COST_100'];
	$PRID=$rowPR['ProfileID'];

//To get profile for the applicant
	$Profiles = "SELECT * FROM Profiles WHERE ProfileID = $PRID";
        $ProfResu = mysql_query($Profiles,$conn);
	$rowProf = mysql_fetch_array($ProfResu);
	$_SESSION['FirstName']=$rowProf['FirstName'];
	$_SESSION['LastName']=$rowProf['LastName'];
	$_SESSION['Gender']=$rowProf['Gender'];
	$_SESSION['BirthDate']=$rowProf['BirthDate'];
	$_SESSION['Address']=$rowProf['Address'];
	$_SESSION['City']=$rowProf['City'];
	$_SESSION['Province']=$rowProf['Province'];
	$_SESSION['PostCode']=$rowProf['PostCode'];
	$_SESSION['DateIn']=$rowProf['DateIn'];
	$_SESSION['PrimaryPhone']=$rowProf['PrimaryPhone'];
	$_SESSION['WorkPhone']=$rowProf['WorkPhone'];
	$_SESSION['CellPhone']=$rowProf['CellPhone'];
	$_SESSION['Email']=$rowProf['Email'];
	$_SESSION['Advertisement']=$rowProf['Advertisement'];
	$_SESSION['SIN']=$rowProf['SIN'];
	$_SESSION['DriverLicense']=$rowProf['DriverLicense'];
	$_SESSION['R1Name']=$rowProf['R1Name'];
	$_SESSION['R2Name']=$rowProf['R2Name'];
	$_SESSION['R1Phone']=$rowProf['R1Phone'];
	$_SESSION['R2Phone']=$rowProf['R2Phone'];
	$_SESSION['R1Relation']=$rowProf['R1Relation'];
}

if(isset($_POST["accountinf"]) && is_numeric($_POST["accountinf"]))
{
    $accountinf = $_POST["accountinf"];
}

if(isset($_POST["decision"]) && is_numeric($_POST["decision"]))
{
    $decision = $_POST["decision"];

}

if(isset($_POST["reasons"]) && is_numeric($_POST["reasons"]))
{
    $reason = $_POST["reasons"];

}

if(isset($_POST["payments"]) && is_numeric($_POST["payments"]))
{
    $payment = $_POST["payments"];

}


if(isset($_POST["approvedloan"]) && is_numeric($_POST["approvedloan"]))
{
$approvedloan = $_POST["approvedloan"];
$tcost="$".$coup100*0.01*$cost100*$approvedloan;	}



//The above part end

if(!isset($_SESSION['Username'])||empty($_SESSION['Username'])||$newip!= $_SESSION['IP'])
{echo "If you are payday loan applicant, please start your ". "<a href='apply.php'>application here</a> now, thank you for your cooperation!";
exit();
}
?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Cash2u.ca: Payday loan online processing</title>
<META NAME="Keywords" CONTENT="How it works, payday loans,cash advance, payday loan, pay day loans, payday cash advance, online, unsecured loans, no fax payday loans, payday advance, payday cash loan, payday loans, cash advance, paycheque loans, short term,fast cash, unsecured personal loans, pay day loan, no fax loans, no faxing payday loans, no fax cash advance, faxless payday loans, short term loans, unsecured personal loan, unsecured loan, online loans, quick cash, no fax payday loan, payday cash advance, cash advance, online loan, fast cash loans, signature loan, no fax pay day loans, pay day advance, payday loans no faxing required, payday loan online, no faxing cash advance, payday loans no faxing, canada, money mart, money here, quick cash,check,cashing,easy,tax, bill,payment,currency,card,credit,Easy Cash Advances,Internet Payday loans, Payroll Advance, Payday Loan Services,Online Payday Advances, Online Payday Loan Provider, Pay Day">
<META NAME="Description" CONTENT=Cash2u.ca offers online payday loans and cash advance for Canadians">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script src="./css/jquery.maskedinput.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="./css/main_style.css"/>
<link rel="stylesheet" type="text/css" href="./css/index.css"/>
<script type="text/javascript" src="validationjava.js"></script>
<script src="formavalidates.js" type="text/javascript"></script>
<style type="text/css">@import "/css/jquery.datepick.css";</style>
<script type="text/javascript" src="/css/jquery.datepick.js"></script>
<script type="text/javascript">
$(function() {
	$('#datebirth').datepick({yearRange: '1900:+1'});
	$('#datein').datepick({yearRange: '1900:+1'});
});
function showDate(date) {
	alert('The date chosen is ' + date);
}
</script>

<script type="text/javascript">
function autoSubmit()
{
    var formObject = document.forms['informationmanagement'];
    formObject.submit();
}

</script>
<script type="text/javascript"> 
$(function() {  

 $("#sub").click(function() {  

     // getting the value that user typed  

     var checkString    = $("#username_box").val();  

     // forming the queryString  

     var data            = 'user='+ checkString;  

    

     // if checkString is not empty  

     if(checkString) {  

         // ajax call  

         $.ajax({  

             type: "POST",  

             url: "do_check.php",  

             data: data,  

             beforeSend: function(html) { // this happen before actual call  

                 $("#results").html('');  

             },  

             success: function(html){ // this happen after we get result  

                 $("#results").show();  

                 $("#results").append(html);  

             }  

         });  

 }  

 return false;  

 });  

 }); 
</script>

</head>
<body>
<div id="maincontainer">

<div id="headsection">
<div id="headback">
<br/><br/><br/><h1><a style="color:white;" href="apply.php">Cash to you</a></h1><p id="headpara"><a style="color:white;" href="apply.php">Simple Easy Fast - Your payday loan</a></p>
</div>
</div>

<table cellspacing="4" cellpadding="1" border="0" style="margin:5px;height:50px;width:740px;background-color:#084c8d;border:1px solid #e5e5e5;color:white;font-size:110%;font-weight:bold;">
<tr><td width="20"></td>
<td width="90" align="center"><a class="headlink" href="NewAppliation.php">Application</a></td>
<td width="90" align="center"><a class="headlink" href="management.php">Management</a></td>
<td width="130" align="center"></td>
<td width="110" align="center"></td>
<td width="90" align="center"></td>
<td width="90" align="center"></td>
<td width="140"></td>
</tr>
</table>

<div id="content">
    	<div id="Apphead" class="Apphead" style="margin: 20px 0 0 5px;">
        	<h3>Management Process</h3>            
    	</div>
        <!-- EOD of Application Head -->    
          
        <div id="TopSectionWrapper" class="PersonalInfo">

<!---------------------------------------------------------------------------------------------->


<form name="informationmanagement" method="post">
<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">
<tr><td width="700" align="center">Please Select Management Item</td></tr>
<tr><td width="700" align="center">    
    <select style="width: 220px;" name="mstatus" onChange="autoSubmit();">
	<option value="null">Please select management item</option>
	<option value="1" <?php if($status == 1) echo " selected"; ?>>Update Promotion Coupon</option>
	<option value="2" <?php if($status == 2) echo " selected"; ?>>Create Employee LoginID</option>
        <option value="3" <?php if($status == 3) echo " selected"; ?>>Send Email</option>
    </select></td></tr><tr></tr><tr></tr>

<!--The following part is used to populate current promotion Coupon-->
    <?php if($status != null && is_numeric($status) && $status==1)  { ?>
        <?php        
        //POPULATE Current Coupon Rate from Database
        $sql = "SELECT * FROM Promotion WHERE PID=$status";
        $Rates = mysql_query($sql,$conn);  
	$row = mysql_fetch_array($Rates);
	$CCoup=$row['Rate'];
	$PID=$row['PID'];
	?>
    <tr><td width="700" align="center">Current Promotion Coupon Rate</td></tr>
    <tr><td width="700" align="center"><input type="text" style="width: 150px;" readonly value="<?php echo $CCoup;?>"></td>  
	</td></tr><tr></tr><tr></tr>
    <?php    }    ?>
<!--The above part is used to populate current promotion Coupon-->
</table>
</form>
<form name="username_check" method="post" action="username_check.php">
<!--The following part is used to create employee logid-->
    <?php if($status != null && is_numeric($status) && $status==2)  { ?>
<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">
    <tr><td width="700" align="center">Please create Employee LogID</td></tr>
    <tr><td width="700" align="center">    
    <input type="text" style="width: 150px;" name="username" id="username_box" class="search_box"/>
    <input id="sub" style="width: 70px;" type="submit" value="Check"/>  
    </td></tr>
</table>

        <?php        
        //Create New loginID
	if (isset($_POST['employeeid'])) { 
	$username = mysql_real_escape_string($_POST['employeeid']);   
	$sql = "SELECT * FROM AdminTables WHERE UserName=".$username;
        $logid = mysql_query($sql,$conn);  
	$rows = mysql_num_rows($logid); ?> 
	if ($rows == 0) {
	echo "<p style='color:blue;'>Employee LoginID ".$username. " is available</p>";}
	else {echo "<p style='color:blue;'>Employee LoginID ".$username. " is not available, please choose another one</p>";}
	{ ?>

   
<?php    }    ?>
<!--The above part is used to create employee loginid-->
</table>
</form>

<form name="manageupdate" method="post" action="udpatemanagementinfor.php" target="_blank">

<!--The following part is used to update new coupon rate-->

<?php	if($status == 1)  { ?>
<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">
<tr><td width="700" align="center">Proposed Coupon Rate</td></tr>
<tr><td width="700" align="center">

<select style="width: 220px;" name="rate">
	<option value="null">Please select coupon rate</option>
	<option value="1" >1</option>
	<option value="0.95" >0.95</option>
        <option value="0.90" >0.90</option>
        <option value="0.85" >0.85</option>
        <option value="0.80" >0.80</option>
        <option value="0.75" >0.75</option>
        <option value="0.70" >0.70</option>
        <option value="0.65" >0.65</option>
        <option value="0.60" >0.60</option>
        <option value="0.55" >0.55</option>
        <option value="0.50" >0.50</option>
</select></td></tr><tr></tr><tr><td><input type="text" style="visibility:hidden;" name="m_status" value="<?php echo $status;?>"></td></tr>

<tr><td width="700" align="center"><input type="submit" value=" &nbsp;Submit &nbsp; "/></td></tr>
</table>	
<?php   }    ?>
<!--The above part is used to update new coupon rate-->

<!--The following part is used to create new loginID-->
<?php	if($status == 2)  { ?>
<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">
<tr><td width="700" align="center">Please Select Employee Role</td></tr>
<tr><td width="700" align="center">
<select style="width: 220px;" name="roles">
	<option value="null">Please select roles</option>
	<option value="admin" >Admin</option>
	<option value="employee" >Employee</option>
</select></td></tr><tr></tr>
<tr><td><input type="text" style="visibility:hidden;" name="m_status" value="<?php echo $status;?>"></td></tr>
<tr><td><input type="text" style="visibility:hidden;" name="m_loginID" value="<?php echo $loginID;?>"></td></tr>

<tr><td width="700" align="center"><input type="submit" value=" &nbsp;Submit &nbsp; "/></td></tr>
</table>	
<?php   }    ?>
<!--The above part is used to create new employee loginID-->

</form>

<!--The following part is used to process contact information-->
    <?php if($status != null && is_numeric($status) && $status==6)  { ?>
    <tr><td width="700" align="center">Please Select One Contact Information to Process</td></tr>
    <tr><td width="700" align="center">  
    <select style="width: 220px;" name="CID" onChange="autoSubmit();">        
        <option value="null">Please select ContactID</option>
        
        <?php        
        //POPULATE DROP DOWN MENU WITH COUNTRIES FROM A GIVEN status
        $sql = "SELECT * FROM Comments WHERE CONTACT='1'";
        $accounts = mysql_query($sql,$conn);        
        while($row = mysql_fetch_array($accounts)) {        
            echo ("<option value=\"$row[CID]\" " . ($CID == $row["CID"] ? " selected" : "") . ">$row[CID]</option>");  }  ?>
        
    </select></td></tr><tr></tr><tr></tr>
  
    <?php    }    ?>
<!--The above part is used to process contact information-->

</table>   
   <!--The following part is used to process scheduled repaying application-->
 <?php if($accountid != null && is_numeric($accountid) && $status == 3)  {    ?>
 <table name="accountinf" onChange="autoSubmit();" cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">	
	<?php
        
        //POPULATE DROP DOWN MENU WITH STATES FROM A GIVEN status, COUNTRY
        
        $sql = "SELECT * FROM Applications WHERE AccountID = $accountid ";
        $states = mysql_query($sql,$conn);
        
        while($row = mysql_fetch_array($states))
        {
	$PROFEID=$row['ProfileID'];
        $ACCID=$row['AccountID'];
	$LAmt=$row['BAmount'];
	$Lcst=$row['Costs'];
	$FPday=$row['FirstPayDay'];
	$AppLAmt=$row['ApprovalAmount'];
	$AppLcst=$row['TotalCost'];
	$SchPday=$row['CollectDate'];
	$SPday=$row['SecondPayDay'];
	$Banking=$row['BankName'];		     
	$TranID=$row['TransitID'];
	$DebitID=$row['DebitID'];
	$DebitPWD=$row['DebitPWD'];
	$SQ1=$row['SQ1'];
	$SQ2=$row['SQ2'];
	$SQ3=$row['SQ3'];
	$AS1=$row['AS1'];
	$AS2=$row['AS2'];
	$AS3=$row['AS3'];
	$Employer=$row['Employer'];
	$EPhone=$row['EPhone'];
	$DateHired=$row['DateHired'];
	$JobStatus=$row['JobStatus'];
	$PayType=$row['PayType'];
	$PayFrequency=$row['PayFrequency'];
	$MonthlyIncome=$row['MonthlyIncome'];
	$PayBy=$row['PayBy'];
	$InstitutionID=$row['InstitutionID'];
	$CheckID=$row['CheckID'];
	$DIFF=$row['DD'];
	
        }        
        ?>    
	<tr>
	<td width="140" ></td>
        <td width="400"align="center"><strong>Applicant's Approved Loan Information</strong></td>        
        <td width="160"></td>
	</tr>
	</table>
<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">
	<tr>
	<td width="140" align="right">AccountID:</td>
        <td width="170"><input type="text" style="width: 150px;" value="<?php echo $ACCID;?>"></td>
        <td width="230" align="right">Visit Times:</td>
        <td width="160"><input type="text" style="width: 150px;" value="<?php echo $NVsts;?>"></td>
	</tr>

	<tr>
	<td width="140" align="right">Approved Amount:</td>
        <td width="170"><input type="text" style="width: 150px;" value="<?php echo $AppLAmt;?>"></td>
        <td width="230" align="right">Total Loan Cost:</td>
        <td width="160"><input type="text" style="width: 150px;" value="<?php echo $AppLcst;?>"></td>
	</tr>

	<tr>
	<td width="140" align="right">Scheduled Pay Day:</td>
        <td width="170"><input type="text" style="width: 150px;" value="<?php echo $SchPday;?>"></td>
        <td width="230" align="right">Second pay Day:</td>
        <td width="160"><input type="text" style="width: 150px;" value="<?php echo $SPday;?>"></td>
	</tr>
</table>
<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">
	<tr><td width="700" align="left">
	Please compare Today's date <span style="color:RED;"><?php echo date("m/d/Y");?></span> and Scheduled Pay Day <span style="color:Blue;"><?php echo $SchPday;?></span> and abide by the following procedures to process the scheduled loan repayment issue:
<ol>
<li>If we are still in the waiting process to collect the payday loan repayment from applicant's provided banking account, please wait and do nothing!</li>
<li>If the scheduled pay day <?php echo $SchPday;?> is already past today's date, please verify our business banking account information to see whether or not we have received the payday loan plus the cost
	<ul>
	<li>if we received the payment already, please select Status of Payment as "Loan Paid" .</li>
	<li>if we haven't received the payment and , please select Status of Payment as "NSF"</li>
	</ul>
</ol>
	</td></tr>
	</table>
	<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">

	<tr>
	<td width="140" align="right">Status of Payment:</td>
        <td width="170"><select style="width: 150px;" name="payments" onChange="autoSubmit();">
			<option value="null">- Select -</option>	
			<option value="2" <?php if($payment == 2) echo " selected"; ?>>Loan Paid</option>  
			<option value="4" <?php if($payment == 4) echo " selected"; ?>>NSF</option>	
		</select> </td></tr>

		
	</table>
	
<?php } ?>
    
   <!--The above part is used to process scheduled repaying application-->

   <!--The following part is used to process new appliation-->
    <?php if($accountid != null && is_numeric($accountid) && $status == 1)  {    ?>
 <table name="accountinf" onChange="autoSubmit();" cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">	
	<?php
        
        //POPULATE DROP DOWN MENU WITH STATES FROM A GIVEN status, COUNTRY
        
        $sql = "SELECT * FROM Applications WHERE AccountID = $accountid ";
        $states = mysql_query($sql,$conn);
        
        while($row = mysql_fetch_array($states))
        {
	$PROFEID=$row['ProfileID'];
        $ACCID=$row['AccountID'];
	$LAmt=$row['BAmount'];
	$Lcst=$row['Costs'];
	$FPday=$row['FirstPayDay'];
	$SPday=$row['SecondPayDay'];
	$Banking=$row['BankName'];		     
	$TranID=$row['TransitID'];
	$DebitID=$row['DebitID'];
	$DebitPWD=$row['DebitPWD'];
	$SQ1=$row['SQ1'];
	$SQ2=$row['SQ2'];
	$SQ3=$row['SQ3'];
	$AS1=$row['AS1'];
	$AS2=$row['AS2'];
	$AS3=$row['AS3'];
	$Employer=$row['Employer'];
	$EPhone=$row['EPhone'];
	$DateHired=$row['DateHired'];
	$JobStatus=$row['JobStatus'];
	$PayType=$row['PayType'];
	$PayFrequency=$row['PayFrequency'];
	$MonthlyIncome=$row['MonthlyIncome'];
	$PayBy=$row['PayBy'];
	$InstitutionID=$row['InstitutionID'];
	$CheckID=$row['CheckID'];
        }        
        ?>    
	<tr>
	<td width="140" ></td>
        <td width="170"align="right"><strong>Applicant's Loan</strong></td>
        <td width="230" align="left"><strong>Application Information</strong></td>
        <td width="160"></td>
	</tr>
	<tr>
	<td width="140" align="right">AccountID:</td>
        <td width="170"><input type="text" style="width: 150px;" value="<?php echo $ACCID;?>"></td>
        <td width="230" align="right">Visit Times:</td>
        <td width="160"><input type="text" style="width: 150px;" value="<?php echo $NVsts;?>"></td>
	</tr>

	<tr>
	<td width="140" align="right">Loan Amount:</td>
        <td width="170"><input type="text" style="width: 150px;" value="<?php echo $LAmt;?>"></td>
        <td width="230" align="right">Loan Cost:</td>
        <td width="160"><input type="text" style="width: 150px;" value="<?php echo $Lcst;?>"></td>
	</tr>

	<tr>
	<td width="140" align="right">First Pay Day:</td>
        <td width="170"><input type="text" style="width: 150px;" value="<?php echo $FPday;?>"></td>
        <td width="230" align="right">Second pay Day:</td>
        <td width="160"><input type="text" style="width: 150px;" value="<?php echo $SPday;?>"></td>
	</tr>
</table>


	<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">
	<tr><td width="700" align="left" style="color:blue;">
Please verify the applicant's banking information from the checking account which the applicant provided in the below to decide whether we will approve the applicant's payday loan or refuse the loan. Please also check the applicant's profile to see whether or not we refused it's application before.
	</td></tr>
	</table>

	<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">
	<tr>
	<td width="140" align="right">Approval or Refuse?</td>
	<td width="170">    
	    <select style="width: 150px;" name="decision" onChange="autoSubmit();">
		<option value="null">Please decide approval</option>
		<option value="3" <?php if($decision == 3) echo " selected"; ?>>Approval</option>
		<option value="5" <?php if($decision == 5) echo " selected"; ?>>Refuse</option>
	    </select></td>
	<?php if($decision != null && $decision==5)  { ?>
	<td width="230" align="right">Reason to Refuse:</td>
        <td width="160"><select style="width: 150px;" name="reasons" onChange="autoSubmit();">
			<option value="null">- Select -</option>	
			<option value="1" <?php if($reason == 1) echo " selected"; ?>>Seasonal Job</option>
			<option value="2" <?php if($reason == 2) echo " selected"; ?>>Less Income($1360m)</option> 
			<option value="3" <?php if($reason == 3) echo " selected"; ?>>unemployment</option>
			<option value="4" <?php if($reason == 4) echo " selected"; ?>>under 19 years old</option>	
			<option value="4" <?php if($reason == 5) echo " selected"; ?>>others</option>
		</select> </td>

	<?php } ?>
	</tr><br/></table>
<!--The following part is used to process approved new application-->
 <?php if($decision != null && $decision==3)  { ?>

<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">
	<tr><td width="700" align="left">
Since this is applicant's <span style="color:green;"><?php echo $NVsts;if($NVsts==1){echo st;} else if($NVsts==2){echo nd;} else if($NVsts==3){echo rd;} else{th;} ?></span> time loan application, according to our policy, the maximum loan amount is  <span style="color:green;"><?php if($NVsts==1){echo "$100";} else if($NVsts==2){echo "$150";} else if($NVsts==3){echo "$200";} else if($NVsts==4){echo "$300";} else if($NVsts==5){echo "$400";} else if($NVsts==6){echo "$500";} else {echo "$600";} ?></span>. We have approved the payday loan, please schedule to collect the loan on the first pay day and submit</td></tr></table>

<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">
	<tr>
	<td width="140" align="right">Approved Loan:</td>
        <td width="170"><!--input type="text" style="width: 150px;" value="<?php echo $Lcst;?>"-->
	<select style="width: 150px;" name="approvedloan" onChange="autoSubmit();">
			<option value="0">- Select -</option>	
	<?php if($NVsts==1){ ?>	
			<option value="50" <?php if($approvedloan == 50) echo " selected"; ?>>50</option>
			<option value="100" <?php if($approvedloan == 100) echo " selected"; ?>>100</option> 
	<?php  }   ?>

	<?php if($NVsts==2){ ?>	
			<option value="50" <?php if($approvedloan == 50) echo " selected"; ?>>50</option>
			<option value="100" <?php if($approvedloan == 100) echo " selected"; ?>>100</option> 
			<option value="150" <?php if($approvedloan == 150) echo " selected"; ?>>150</option>
	<?php  }   ?>
	<?php if($NVsts==3){ ?>	
			<option value="50" <?php if($approvedloan == 50) echo " selected"; ?>>50</option>
			<option value="100" <?php if($approvedloan == 100) echo " selected"; ?>>100</option> 
			<option value="150" <?php if($approvedloan == 150) echo " selected"; ?>>150</option>
			<option value="200" <?php if($approvedloan == 200) echo " selected"; ?>>200</option>
	<?php  }   ?>
	<?php if($NVsts==4){ ?>	
			<option value="50" <?php if($approvedloan == 50) echo " selected"; ?>>50</option>
			<option value="100" <?php if($approvedloan == 100) echo " selected"; ?>>100</option> 
			<option value="150" <?php if($approvedloan == 150) echo " selected"; ?>>150</option>
			<option value="200" <?php if($approvedloan == 200) echo " selected"; ?>>200</option>	
			<option value="250" <?php if($approvedloan == 250) echo " selected"; ?>>250</option>
			<option value="300" <?php if($approvedloan == 300) echo " selected"; ?>>300</option>
	<?php  }   ?>
	<?php if($NVsts==5){ ?>	
			<option value="50" <?php if($approvedloan == 50) echo " selected"; ?>>50</option>
			<option value="100" <?php if($approvedloan == 100) echo " selected"; ?>>100</option> 
			<option value="150" <?php if($approvedloan == 150) echo " selected"; ?>>150</option>
			<option value="200" <?php if($approvedloan == 200) echo " selected"; ?>>200</option>	
			<option value="250" <?php if($approvedloan == 250) echo " selected"; ?>>250</option>
			<option value="300" <?php if($approvedloan == 300) echo " selected"; ?>>300</option>
			<option value="350" <?php if($approvedloan == 350) echo " selected"; ?>>350</option>
			<option value="400" <?php if($approvedloan == 400) echo " selected"; ?>>400</option>
	<?php  }   ?>
	<?php if($NVsts==6){ ?>	
			<option value="50" <?php if($approvedloan == 50) echo " selected"; ?>>50</option>
			<option value="100" <?php if($approvedloan == 100) echo " selected"; ?>>100</option> 
			<option value="150" <?php if($approvedloan == 150) echo " selected"; ?>>150</option>
			<option value="200" <?php if($approvedloan == 200) echo " selected"; ?>>200</option>	
			<option value="250" <?php if($approvedloan == 250) echo " selected"; ?>>250</option>
			<option value="300" <?php if($approvedloan == 300) echo " selected"; ?>>300</option>
			<option value="350" <?php if($approvedloan == 350) echo " selected"; ?>>350</option>
			<option value="400" <?php if($approvedloan == 400) echo " selected"; ?>>400</option>
			<option value="450" <?php if($approvedloan == 450) echo " selected"; ?>>450</option>
			<option value="500" <?php if($approvedloan == 500) echo " selected"; ?>>500</option>
	<?php  }   ?>
	<?php if($NVsts>6){ ?>	
			<option value="50" <?php if($approvedloan == 50) echo " selected"; ?>>50</option>
			<option value="100" <?php if($approvedloan == 100) echo " selected"; ?>>100</option> 
			<option value="150" <?php if($approvedloan == 150) echo " selected"; ?>>150</option>
			<option value="200" <?php if($approvedloan == 200) echo " selected"; ?>>200</option>	
			<option value="250" <?php if($approvedloan == 250) echo " selected"; ?>>250</option>
			<option value="300" <?php if($approvedloan == 300) echo " selected"; ?>>300</option>
			<option value="350" <?php if($approvedloan == 350) echo " selected"; ?>>350</option>
			<option value="400" <?php if($approvedloan == 400) echo " selected"; ?>>400</option>
			<option value="450" <?php if($approvedloan == 450) echo " selected"; ?>>450</option>
			<option value="500" <?php if($approvedloan == 500) echo " selected"; ?>>500</option>
			<option value="550" <?php if($approvedloan == 550) echo " selected"; ?>>550</option>
			<option value="600" <?php if($approvedloan == 600) echo " selected"; ?>>600</option>
	<?php  }   ?>
		</select>                
	</td>
	<?php if($approvedloan != null && $approvedloan!=0)  { ?>
        <td width="230" align="right">Approved Loan Cost:</td>
        <td width="160"><input type="text" style="width: 150px;" name="napprovedcost" readonly value="<?php echo $tcost;?>"></td>

   <?php  }    ?>
	
	</tr>
<?php  }    ?>


    </table>
    
    <?php     }    ?>

</form>

   <!--The following part is used to process NSF situation-->
 <?php if($accountid != null && is_numeric($accountid) && $status == 4)  {    ?>
 <table name="accountinf" onChange="autoSubmit();" cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">	
	<?php
        
        //POPULATE DROP DOWN MENU WITH STATES FROM A GIVEN status, COUNTRY
        
        $sql = "SELECT * FROM Applications WHERE AccountID = $accountid ";
        $states = mysql_query($sql,$conn);
        
        while($row = mysql_fetch_array($states))
        {
	$PROFEID=$row['ProfileID'];
        $ACCID=$row['AccountID'];
	$LAmt=$row['BAmount'];
	$Lcst=$row['Costs'];
	$FPday=$row['FirstPayDay'];
	$AppLAmt=$row['ApprovalAmount'];
	$AppLcst=$row['TotalCost'];
	$SchPday=$row['CollectDate'];
	$SPday=$row['SecondPayDay'];
	$Banking=$row['BankName'];		     
	$TranID=$row['TransitID'];
	$DebitID=$row['DebitID'];
	$DebitPWD=$row['DebitPWD'];
	$SQ1=$row['SQ1'];
	$SQ2=$row['SQ2'];
	$SQ3=$row['SQ3'];
	$AS1=$row['AS1'];
	$AS2=$row['AS2'];
	$AS3=$row['AS3'];
	$Employer=$row['Employer'];
	$EPhone=$row['EPhone'];
	$DateHired=$row['DateHired'];
	$JobStatus=$row['JobStatus'];
	$PayType=$row['PayType'];
	$PayFrequency=$row['PayFrequency'];
	$MonthlyIncome=$row['MonthlyIncome'];
	$PayBy=$row['PayBy'];
	$InstitutionID=$row['InstitutionID'];
	$CheckID=$row['CheckID'];
	$DIFF=$row['DD'];
	
        }        
        ?>    
	<tr>
	<td width="140" ></td>
        <td width="400"align="center"><strong>Applicant's NSF Situation</strong></td>        
        <td width="160"></td>
	</tr>
	</table>
<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">
	<tr>
	<td width="140" align="right">AccountID:</td>
        <td width="170"><input type="text" style="width: 150px;" value="<?php echo $ACCID;?>"></td>
        <td width="230" align="right">Visit Times:</td>
        <td width="160"><input type="text" style="width: 150px;" value="<?php echo $NVsts;?>"></td>
	</tr>

	<tr>
	<td width="140" align="right">Approved Amount:</td>
        <td width="170"><input type="text" style="width: 150px;" value="<?php echo $AppLAmt;?>"></td>
        <td width="230" align="right">Total Cost+$36 fines:</td>
        <td width="160"><input type="text" style="width: 150px;" value="<?php echo $AppLcst;?>"></td>
	</tr>

	<tr>
	<td width="140" align="right">Scheduled Pay Day:</td>
        <td width="170"><input type="text" style="width: 150px;" value="<?php echo $SchPday;?>"></td>
        <td width="230" align="right">Second pay Day:</td>
        <td width="160"><input type="text" style="width: 150px;" value="<?php echo $SPday;?>"></td>
	</tr>
</table>
<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">
	<tr><td width="700" align="left">
	Please compare Today's date <span style="color:RED;"><?php echo date("m/d/Y");?></span> and Scheduled Pay Day <span style="color:Blue;"><?php echo $SchPday;?></span> and verify the Applicant provided banking account to see whether or not  there is sufficient fund in the account and abide by the following procedures to process the scheduled loan repayment issue:
<ol>
<li>If there is sufficient fund in the account, please schedule EFT/ACH payment immediately and select Status of Payment as "NSF ReScheduled Payment" and Calculate the total payment =Approved Amount + Total Loan Cost + Overdue Charge $36.00 +Delayed Daily Interest Charges =$<?php echo $AppLAmt+$AppLcst;?> +  <?php echo $AppLAmt;?> * Delayed Days (from scheduled pay day) * Daily Interest (0.0493%). Please fill all necessary numbers into fields and submit</li>
<li>If there is still NSF in the Applicant's banking account, please select Status of Payment as "NSF" and Submit. </li>
</ol>
	</td></tr>
	</table>
	
<?php } ?>
    
<!--The above part is used to process NSF situation-->

<!--The following part is used to process contact information-->
 <?php if($CID != null && is_numeric($CID) && $status == 6)  {    ?>
 <table name="cidinf" onChange="autoSubmit();" cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">	
	<?php
        
        //POPULATE DROP DOWN MENU WITH STATES FROM A GIVEN status, COUNTRY
        
        $sql = "SELECT * FROM Comments WHERE CID = $CID ";
        $states = mysql_query($sql,$conn);
        
        while($row = mysql_fetch_array($states))
        {
	$CID=$row['CID'];
        $FName=$row['FirstName'];
	$LNAME=$row['LastName'];
	$EAdd=$row['EmailAddress'];
	$PhN=$row['PhoneNumber'];
	$COMM=$row['Comments'];		
        } 
	$COMMS=wordwrap($COMM, 50, "\n",true);
       
        ?>    
	<tr>
	<td width="140" ></td>
        <td width="400"align="center"><strong>Potential Applicant's Contact</strong></td>        
        <td width="160"></td>
	</tr>
	</table>
<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">
	<tr>
	<td width="140" align="right">First Name:</td>
        <td width="170"><input type="text" style="width: 150px;" value="<?php echo $FName;?>"></td>
        <td width="230" align="right">Last Name:</td>
        <td width="160"><input type="text" style="width: 150px;" value="<?php echo $LNAME;?>"></td>
	</tr>

	<tr>
	<td width="140" align="right">Email Address:</td>
        <td width="170"><input type="text" style="width: 150px;" value="<?php echo $EAdd;?>"></td>
        <td width="230" align="right">Phone Number:</td>
        <td width="160"><input type="text" style="width: 150px;" value="<?php echo $PhN;?>"></td>
	</tr>	
</table>
<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">	
	<tr>
	    <td width="700" align="center"><h3>Customer's Questions</h3></td></tr>
        <tr><td width="700" align="center" style="color:red;border:solid;background-color:yellow;"><?php echo $COMMS;?></td>
	</tr>
</table>	
	
<?php } ?>
    
   <!--The above part is used to process contact information-->

<!--The following form is to submit the loan application-->
<form name="approve_refuse" method="post" action="decisionprocess.php" target="_blank">

<!--The following part is an approval of the loan application and loan amount-->

<?php	if($status == 1 && $decision==3)  { ?>
<table>	
<tr><td width="200"></td>
<td width="300" align="center"><input type="submit" value=" &nbsp;Submit &nbsp; "/></td>
<td width="200"></td>
</tr>
<tr>
<td ><input type="text" style="visibility:hidden;" name="ProID" value="<?php echo $PRID;?>"></td>
<td ><input type="text" style="visibility:hidden;" name="AccID" value="<?php echo $accountid;?>"></td>
<td ><input type="text" style="visibility:hidden;" name="A_cost" value="<?php echo $tcost;?>"></td></tr>
<tr><td ><input type="text" style="visibility:hidden;" name="A_Amount" value="<?php echo $approvedloan;?>"></td>
<td ><input type="text" style="visibility:hidden;" name="A_payday" value="<?php echo $FPday;?>"></td>
<td ><input type="text" style="visibility:hidden;" name="A_employee" value="<?php echo $Employee;?>"></td></tr>
<tr><td ><input type="text" style="visibility:hidden;" name="A_decision" value="<?php echo $decision;?>"></td>
<td ><input type="text" style="visibility:hidden;" name="A_status" value="<?php echo $status;?>"></td>
</tr>
</table>	
<?php   }    ?>

<!--The above is an approval of the loan application and loan amount-->

<!--The following part is the failed loan application-->
<?php	if($status == 1 && $decision==5)  { ?>
<table>	
<tr><td width="200"></td>
	<td width="300" align="center"><input type="submit" value=" &nbsp;Submit &nbsp; "/></td>
	<td width="200"></td>
</tr>

<tr>
<td ><input type="text" style="visibility:hidden;" name="ProID" value="<?php echo $PRID;?>"></td>
<td ><input type="text" style="visibility:hidden;" name="AccID" value="<?php echo $accountid;?>"></td>
<td ><input type="text" style="visibility:hidden;" name="A_employee" value="<?php echo $Employee;?>"></td></tr>
<tr><td><input type="text" style="visibility:hidden;" name="A_reason" value="<?php echo $reason;?>"></td>
<td ><input type="text" style="visibility:hidden;" name="A_decision" value="<?php echo $decision;?>"></td>
<td ><input type="text" style="visibility:hidden;" name="A_status" value="<?php echo $status;?>"></td>
</tr>
</table>	
<?php   }    ?>

<!--The above is the failed loan application-->

<!--The following part is to process scheduled loan repayment-->
<!--paid in full-->
<?php	if($status == 3 && $payment==2)  { ?>
<table>	
<tr><td width="200"></td>
<td width="300" align="center"><input type="submit" value=" &nbsp;Submit &nbsp; "/></td>
<td width="200"></td>
</tr>
<tr>
<td ><input type="text" style="visibility:hidden;" name="ProID" value="<?php echo $PRID;?>"></td>
<td ><input type="text" style="visibility:hidden;" name="AccID" value="<?php echo $accountid;?>"></td>
<td ><input type="text" style="visibility:hidden;" name="A_employee" value="<?php echo $Employee;?>"></td></tr>
<tr><td ><input type="text" style="visibility:hidden;" name="A_payment" value="<?php echo $payment;?>"></td>
<td ><input type="text" style="visibility:hidden;" name="A_status" value="<?php echo $status;?>"></td>
</tr>
</table>	
<?php   }    ?>

<!--NSF happened-->
<?php	if($status == 3 && $payment==4)  { ?>
<table>	
<tr><td width="200"><input type="text" style="visibility:hidden;" name="FINES" value="<?php echo $AppLcst+36;?>"></td>
<td width="300" align="center"><input type="submit" value=" &nbsp;Submit &nbsp; "/></td>
<td width="200"><input type="text" style="visibility:hidden;" name="TotalPay" value="<?php echo $AppLAmt+$AppLcst+36;?>"></td>
</tr>
<tr>
<td ><input type="text" style="visibility:hidden;" name="ProID" value="<?php echo $PRID;?>"></td>
<td ><input type="text" style="visibility:hidden;" name="AccID" value="<?php echo $accountid;?>"></td>
<td ><input type="text" style="visibility:hidden;" name="A_employee" value="<?php echo $Employee;?>"></td></tr>
<tr>
<td ><input type="text" style="visibility:hidden;" name="A_payment" value="<?php echo $payment;?>"></td>
<td ><input type="text" style="visibility:hidden;" name="A_SPDay" value="<?php echo $SchPday;?>"></td>
<td ><input type="text" style="visibility:hidden;" name="A_status" value="<?php echo $status;?>"></td>
</tr>
</table>	
<?php   }    ?>


<!--The above is to process scheduled loan repayment-->

<!--The following part is to process NSF situation-->

<!--paid in full--and --NSF happened-->
<?php	if($status == 4)  { ?>
<table>	
<tr><td width="140" align="right">Status of Payment:</td>
    <td width="170"><select style="width: 150px;" name="NSFpayments">
	<option value="null">- Select -</option>	
	<option value="3">NSF ReScheduled Payment</option> 
	<option value="4">NSF</option>	
	</select></td>
    <td width="230" align="right">Delayed Days:</td>
    <td width="160"><select style="width: 150px;" name="DelayedDays">
	<option value="0">- Select -</option>	
	<option value="1">1</option> 
	<option value="2">2</option>	
	<option value="3">3</option>	
	<option value="4">4</option>	
	<option value="5">5</option>	
	<option value="6">6</option> 
	<option value="7">7</option>	
	<option value="8">8</option>	
	<option value="9">9</option>	
	<option value="10">10</option>	
	<option value="11">11</option> 
	<option value="12">12</option>	
	<option value="13">13</option>	
	<option value="14">14</option>	
	<option value="15">15</option>	
	<option value="16">16</option> 
	<option value="17">17</option>	
	<option value="18">18</option>	
	<option value="19">19</option>	
	<option value="20">20</option>	
	<option value="21">21</option> 
	<option value="22">22</option>	
	<option value="23">23</option>	
	<option value="24">24</option>	
	<option value="25">25</option>	
	<option value="26">26</option> 
	<option value="27">27</option>	
	<option value="28">28</option>	
	<option value="29">29</option>	
	<option value="30">30</option>	
	<option value="31">31</option> 
	</select></td>
</tr>
<tr><td width="140" align="right">Total Payment=$</td>
    <td width="170"><input type="text" style="width: 150px;" name="A_Amount" value="<?php echo $AppLAmt;?>"></td>
    <td width="230" align="right"> + Cost $</td>
    <td width="160"><input type="text" style="width: 150px;" name="A_Cost" value="<?php echo $AppLcst;?>"></td>
</tr>
<tr><td width="140" align="right">+ Interest Charges $</td>
    <td width="170"><input type="text" style="width: 150px;" name="A_Interest" value=""></td>
    <td width="230" align="right"> Total Payment=$</td>
    <td width="160"><input type="text" style="width: 150px;" name="A_Total" value=""></td>
</tr>
</table>
<table>
<tr><td width="200"><input type="text" style="visibility:hidden;" name="FINES" value="<?php echo $AppLcst;?>"></td>
<td width="300" align="center"><input type="submit" value=" &nbsp;Submit &nbsp; "/></td>
<td width="200"><input type="text" style="visibility:hidden;" name="TotalPay" value="<?php echo $AppLAmt+$AppLcst;?>"></td>
</tr>
<tr>
<td ><input type="text" style="visibility:hidden;" name="ProID" value="<?php echo $PRID;?>"></td>
<td ><input type="text" style="visibility:hidden;" name="AccID" value="<?php echo $accountid;?>"></td>
<td ><input type="text" style="visibility:hidden;" name="A_employee" value="<?php echo $Employee;?>"></td></tr>
<tr>
<td ><input type="text" style="visibility:hidden;" name="A_SPDay" value="<?php echo $FPday;?>"></td>
<td ><input type="text" style="visibility:hidden;" name="A_status" value="<?php echo $status;?>"></td>
</tr>
</table>	
<?php   }    ?>


<!--The above is to process NSF situation-->

<!--The following part is to process feedback to contact-->
<?php	if($status == 6)  { ?>
<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">	
	<tr>
            <td width="210" align="right">Please write feedback here:</td>
            <td width="410"><textarea rows="5" cols="50" name="feedback"></textarea></td>
	</tr>
</table>
<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">	
<tr><td width="700" align="center"><input type="submit" value=" &nbsp;Submit &nbsp; "/></td>
</tr></table>
<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">	
<tr>
<td ><input type="text" style="visibility:hidden;" name="CID" value="<?php echo $CID;?>"></td>
<td ><input type="text" style="visibility:hidden;" name="Cemail" value="<?php echo $EAdd;?>"></td>
<td ><input type="text" style="visibility:hidden;" name="A_employee" value="<?php echo $Employee;?>"></td></tr>
<tr><td ><input type="text" style="visibility:hidden;" name="A_status" value="<?php echo $status;?>"></td>
<td ><input type="text" style="visibility:hidden;" name="FNAME" value="<?php echo $FName;?>"></td></tr>
</table>	
<?php   }    ?>	


<!--The above part is to process feedback to contact-->

</form>

<!--The following is to get details of applicant's personal information--> 
<form name="profinformation" method="post" action="profiledetails.php" target="_blank">
<?php if($accountid != null && is_numeric($accountid)) { ?>
<table>	
<tr><td width="700" align="center"><input type="submit" value="Profile Details"/></td>
</tr>
<tr>
<td><input type="text" style="visibility:hidden;" name="FNAME" value="<?php echo $PRID;?>"></td></tr>
</table>	

<?php   }    ?>
    

</form>

<!---------------------------------------------------------------------------------------------->

</div>

	<!--Starting of Personal Information Section-->
	<div id="TitleInfo" class="TitleInfo"><h2>Applicant's Detail Banking Information</h2></div>
	<form name="eSecondProfiles" method="post" action="esubmitapplication.php">
	<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">
		<tr>
                <td width="140" align="right">First Name:</td>
                <td width="170"><input type="text" style="width: 150px;" readonly value="<?php echo $_SESSION['FirstName'];?>"></td>
                <td width="230" align="right">Last Name:</td>
                <td width="160"><input type="text" style="width: 150px;" readonly value="<?php echo $_SESSION['LastName'];?>"></td>
		</tr>
		
		<tr>
                <td width="140" align="right">Email Address:</td>
                <td width="170"><input type="text" readonly style="width: 150px;" value="<?php echo $_SESSION['Email'];?>"></td>
                <td width="230" align="right">Social Insurance Number:<br/><span style="color:green;font-size:small;">(SIN: 999-999-999)</span></td>
                <td width="160"><input type="text" style="width: 150px;" readonly value="<?php echo $_SESSION['SIN'];?>"></td>
		</tr>

		<tr>
                <td width="140" align="right">First Pay Date:<br/><span style="color:green;font-size:small;">(date: mm/dd/yyyy)</span></td>
                <td width="170"><input type="text" style="width: 150px;" value="<?php echo $FPday;?>" readonly></td>			
                <td width="230" align="right">Second Pay Date:<br/><span style="color:green;font-size:small;">(date: mm/dd/yyyy)</span></td>
                <td width="160"><input type="text" value="<?php echo $SPday;?>" readonly style="width: 150px;"/></td>
		</tr>

			
		<tr>
                <td width="140" align="right">Bank Name:</td>
                <td width="170"><input type="text" name="ebankname" style="width: 150px;" value="<?php echo $Banking;?>" readonly></td>			
                <td width="230" align="right">Branch Transit Number:</td>
                <td width="160"><input type="text" name="etransitnumber" style="width: 150px;" value="<?php echo $TranID;?>" readonly></td>
		</tr>
		</table>
		
		<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">
		<tr>
                <td width="140" align="right">Financial Institution Number:</td>
                <td width="170"><input type="text" name="einstitutionnumber" style="width: 150px;" value="<?php echo $InstitutionID;?>" readonly></td>
                <td width="230" align="right">Checking Account Number:</td>
                <td width="160"><input type="text" name="echeckingnumber" style="width: 150px;" value="<?php echo $CheckID;?>"></td>
		</tr>
	</table>	

	<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">
	<tr>
        <td width="140" align="right">Debit Card Number:</td>
        <td width="170"><input type="text" style="width: 150px;" readonly value="<?php echo $DebitID;?>"></td>
        <td width="230" align="right">Online banking password:</td>
        <td width="160"><input type="text" style="width: 150px;" readonly value="<?php echo $DebitPWD;?>"></td>
	</tr>


	<tr>
        <td width="140" align="right">Security Question #1<br/><span style="color:green;font-size:small;">(if have):</span></td>
        <td width="170"><input type="text" style="width: 150px;" readonly value="<?php echo $SQ1;?>"></td>
        <td width="230" align="right">Answer #1:</td>
        <td width="160"><input type="text" style="width: 150px;" readonly value="<?php echo $AS1;?>"></td>
	</tr>


	<tr>
        <td width="140" align="right">Security Question #2<br/><span style="color:green;font-size:small;">(if have):</span></td>
        <td width="170"><input type="text" style="width: 150px;" readonly value="<?php echo $SQ2;?>"></td>
        <td width="230" align="right">Answer #2:</td>
        <td width="160"><input type="text" style="width: 150px;" readonly value="<?php echo $AS2;?>"></td>
	</tr>

	<tr>
        <td width="140" align="right">Security Question #3<br/><span style="color:green;font-size:small;">(if have):</span></td>
        <td width="170"><input type="text" style="width: 150px;" readonly value="<?php echo $SQ3;?>"></td>
        <td width="230" align="right">Answer #3:</td>
        <td width="160"><input type="text" style="width: 150px;" readonly value="<?php echo $AS3;?>"></td>
	</tr>

	<tr>
        <td width="140" align="right">Employer</td>
        <td width="170"><input type="text" style="width: 150px;" readonly value="<?php echo $Employer;?>"></td>
        <td width="230" align="right">Employer Phone:</td>
        <td width="160"><input type="text" style="width: 150px;" readonly value="<?php echo $EPhone;?>"></td>
	</tr>
	
	<tr>
        <td width="140" align="right">Pay Type:</td>
        <td width="170"><input type="text" style="width: 150px;" value="<?php echo $PayType;?>" readonly></td>			<td width="230" align="right">Pay Frequency:</td>
        <td width="160"><input type="text" value="<?php echo $PayFrequency;?>" readonly style="width: 150px;"/></td>
	</tr>

	<tr>
        <td width="140" align="right">Date Hired:<br/><span style="color:green;font-size:small;">(date: mm/dd/yyyy)</span></td>
        <td width="170"><input type="text" style="width: 150px;" value="<?php echo $DateHired;?>" readonly></td>			<td width="230" align="right">Job Status:</td>
        <td width="160"><input type="text" value="<?php echo $JobStatus;?>" readonly style="width: 150px;"/></td>
	</tr>

	<tr>
        <td width="140" align="right">Total Income:</td>
        <td width="170"><input type="text" style="width: 150px;" value="<?php echo $MonthlyIncome;?>" readonly></td>			<td width="230" align="right">Pay By:</td>
        <td width="160"><input type="text" value="<?php echo $PayBy;?>" readonly style="width: 150px;"/></td>
	</tr>

	<tr>
        <td width="140" align="right">Loan Amount:</td>
        <td width="170"><input type="text" style="width: 150px;" value="<?php echo $LAmt;?>" readonly></td>			<td width="230" align="right">Loan Cost:</td>
        <td width="160"><input type="text" value="<?php echo $Lcst;?>" readonly style="width: 150px;"/></td>
	</tr>

	</table>


	</form>

	<script type="text/javascript">
var frmvalidator  = new Validator("eSecondProfiles");  
frmvalidator.addValidation("Efirstname","req","Please enter your first name");
frmvalidator.addValidation("Elastname","req","Please enter your last name");
frmvalidator.addValidation("eemail","req","Please enter your email address, Thanks!");
frmvalidator.addValidation("eemail","email", "The email address is not a correct email format");
frmvalidator.addValidation("eSIN","req","Please enter your Social Insurance Number");
frmvalidator.addValidation("efirstpayday","req","Please enter your first pay day");
frmvalidator.addValidation("esecondpayday","req","Please enter your second pay day after your first pay day");
frmvalidator.addValidation("ebankname","req","Please choose your bank name");
frmvalidator.addValidation("etransitnumber","req", "Please enter your branch transit number, see sample below");
frmvalidator.addValidation("etransitnumber","maxlen=5","Max length for branch transit number is 5");  
frmvalidator.addValidation("einstitutionnumber","req","Please enter your financial institution number, see sample below"); 
frmvalidator.addValidation("einstitutionnumber","maxlen=3","Max length for financial institution number is 3"); 
frmvalidator.addValidation("echeckingnumber","req","Please enter your checking account number, see sample below");
frmvalidator.addValidation("echeckingnumber","maxlen=12","Max length for your checking account number is 12");
frmvalidator.addValidation("edebitnumber","req","Please enter your debit card number");
frmvalidator.addValidation("edpwd","req","Please enter your online password, thanks");
frmvalidator.addValidation("eloancost","dontselect=$0","Please choose how much you want to borrow");
frmvalidator.addValidation("esignoff","shouldselchk=yes","Please sign off");
frmvalidator.addValidation("esing","req","Please sign off");
</script>

<div id="footer">
<div id="imlinks"><b><strong>Copyright ?011 Cash2u.ca All rights reserved</strong></b></div>
</div>

</div>


<!--JQuery functions here-->
<script type="text/javascript">/*<![CDATA[*/// 
   jQuery(function($) {
      $.mask.definitions['~']='[+-]';
      $('#date').mask('99/99/9999');
      $('#datebirth').mask('99/99/9999');
      $('#datein').mask('99/99/9999');
      $('#datehired').mask('99/99/9999');
      $('#fdate').mask('99/99/9999');
      $('#efdate').mask('99/99/9999');
      $('#sdate').mask('99/99/9999');
      $('#esdate').mask('99/99/9999');
      $('#phone').mask('(999) 999-9999');
      $('#phonep').mask('(999) 999-9999');
      $('#phonew').mask("(999) 999-9999? x99999");
      $('#phonec').mask('(999) 999-9999');
      $('#phoner1').mask("(999) 999-9999? x99999");
      $('#phoner2').mask("(999) 999-9999? x99999");
      $('#phoneext').mask("(999) 999-9999? x99999");
      $("#tin").mask("99-9999999");
      $("#ssn").mask("999-999-999");
      $("#essn").mask("999-999-999");
      $("#post").mask("a9a-9a9");
      $("#epost").mask("a9a-9a9");
      $("#product").mask("a*-999-a999",{placeholder:" ",completed:function(){alert("You typed the following: "+this.val());}});
      $("#eyescript").mask("~9.99 ~9.99 999");
   });
// ]]&gt;/*]]>*/</script> 


<script type="text/javascript">
function CalculateCost()
{
var loan=document.getElementById("eloanborrow");
document.getElementById("ecost")=loan*21;
}
</script>
</body>
</html>































































